namespace Scap.Data.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class db2 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.ScapDepartmentEmployeeAssistances", "Employee_Id", "dbo.ScapDepartmentEmployees");
            DropIndex("dbo.ScapDepartmentEmployeeAssistances", new[] { "Employee_Id" });
            AddColumn("dbo.ScapDepartmentEmployeeAssistances", "DepartmentEmployee_Id", c => c.Int());
            AddForeignKey("dbo.ScapDepartmentEmployeeAssistances", "DepartmentEmployee_Id", "dbo.ScapDepartmentEmployees", "Id");
            CreateIndex("dbo.ScapDepartmentEmployeeAssistances", "DepartmentEmployee_Id");
            DropColumn("dbo.ScapDepartmentEmployeeAssistances", "Employee_Id");
        }
        
        public override void Down()
        {
            AddColumn("dbo.ScapDepartmentEmployeeAssistances", "Employee_Id", c => c.Int());
            DropIndex("dbo.ScapDepartmentEmployeeAssistances", new[] { "DepartmentEmployee_Id" });
            DropForeignKey("dbo.ScapDepartmentEmployeeAssistances", "DepartmentEmployee_Id", "dbo.ScapDepartmentEmployees");
            DropColumn("dbo.ScapDepartmentEmployeeAssistances", "DepartmentEmployee_Id");
            CreateIndex("dbo.ScapDepartmentEmployeeAssistances", "Employee_Id");
            AddForeignKey("dbo.ScapDepartmentEmployeeAssistances", "Employee_Id", "dbo.ScapDepartmentEmployees", "Id");
        }
    }
}
